package com.fay.corejava.chapter4;

/**
 * @Title:
 * @Description:
 * @Author Fay Wang
 * @Date 2022/2/20 22:52
 * @Version 1.0
 */
public enum Operation {

    ADD {
        @Override
        public int eval(int arg1, int arg2) {
            return arg1 + arg2;
        }
    },
    SUBTRACT {
        @Override
        public int eval(int arg1, int arg2) {
            return arg1 - arg2;
        }
    };


    public abstract int eval(int arg1, int arg2);

}
